﻿<dialogs:DialogBase x:Class="Daytimer.GoogleCalendarHelpers.GoogleSignIn"
		xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
		xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
		xmlns:metroprogress="clr-namespace:Daytimer.Fundamentals.MetroProgress;assembly=Daytimer.Fundamentals"
		xmlns:dialogs="clr-namespace:Daytimer.Dialogs;assembly=Daytimer.Dialogs" Title="Google Sign In" Width="415"
		Height="550" ResizeMode="NoResize" ShowInTaskbar="False" WindowStartupLocation="CenterScreen"
		IsTitleVisible="False">
	<Grid Margin="45,27" ClipToBounds="True">
		<Grid.RowDefinitions>
			<RowDefinition Height="Auto" />
			<RowDefinition Height="Auto" />
			<RowDefinition />
			<RowDefinition Height="Auto" />
		</Grid.RowDefinitions>
		<TextBlock Text="Sign In to Google" HorizontalAlignment="Left" VerticalAlignment="Top" FontSize="33"
				FontFamily="/Daytimer.Fonts;component/#WeblySleek UI Light"
				Foreground="{DynamicResource DialogTitle}" IsHitTestVisible="False" />
		<TextBlock x:Name="message" Grid.Row="1" HorizontalAlignment="Left" VerticalAlignment="Top"
				Text="Enter your Google account credentials below." TextWrapping="Wrap" Margin="0,40,0,0"
				IsHitTestVisible="False" />
		<Grid x:Name="userDataGrid" Grid.Row="2" VerticalAlignment="Center">
			<Grid.ColumnDefinitions>
				<ColumnDefinition Width="Auto" />
				<ColumnDefinition />
			</Grid.ColumnDefinitions>
			<Grid.RowDefinitions>
				<RowDefinition />
				<RowDefinition />
				<RowDefinition />
			</Grid.RowDefinitions>
			<TextBlock Text="Email:" VerticalAlignment="Center" Margin="0,0,10,0" IsHitTestVisible="False" />
			<TextBox x:Name="emailBox" Grid.Column="1" Margin="0,10" PreviewKeyUp="emailBox_PreviewKeyUp" />
			<TextBlock Grid.Row="1" Text="Password:" VerticalAlignment="Center" Margin="0,0,10,0"
					IsHitTestVisible="False" />
			<Grid Grid.Column="1" Grid.Row="1" Margin="0,10">
				<PasswordBox x:Name="passwordBox" Grid.Column="1" Grid.Row="1"
						GotKeyboardFocus="passwordBox_GotKeyboardFocus"
						LostKeyboardFocus="passwordBox_LostKeyboardFocus" PreviewKeyUp="passwordBox_PreviewKeyUp" />
				<Popup x:Name="capsLockMsg" StaysOpen="True" AllowsTransparency="True" IsHitTestVisible="False">
					<Grid>
						<Border Background="{DynamicResource White}" BorderBrush="#EAC282" BorderThickness="1"
								Margin="0,9,0,0" />
						<StackPanel Orientation="Horizontal" Margin="10,19,10,10">
							<Image Stretch="None" VerticalAlignment="Center" Margin="0,0,5,0"
									Source="pack://application:,,/Daytimer.Images;component/Images/yellowexclamation.png" />
							<TextBlock Text="Caps lock is on" VerticalAlignment="Center" />
						</StackPanel>
						<Path Data="M 0 9 9.5 -0.5 19 9" Fill="{DynamicResource White}" Stroke="#EAC282"
								StrokeThickness="1" VerticalAlignment="Top" HorizontalAlignment="Left"
								RenderOptions.EdgeMode="Aliased" Margin="0,1,0,0" />
					</Grid>
				</Popup>
			</Grid>
			<Button x:Name="signInButton" Grid.Row="2" Grid.Column="1" HorizontalAlignment="Right" Height="25"
					IsDefault="True" Width="80" Content="_Sign In" Margin="0,10" Click="signInButton_Click" />
		</Grid>
		<metroprogress:IndeterminateProgressBar x:Name="animation" Grid.Row="2" VerticalAlignment="Center"
				HorizontalAlignment="Stretch" StartOnLoad="False" Foreground="Black" />
		<Button x:Name="retryButton" Grid.Row="3" Content="_Retry" HorizontalAlignment="Right"
				VerticalAlignment="Bottom" Visibility="Collapsed" Margin="0,0,95,0" Width="80" Height="25"
				Click="retryButton_Click" />
		<Button x:Name="closeButton" Grid.Row="3" Content="_Close" HorizontalAlignment="Right"
				VerticalAlignment="Bottom" Visibility="Collapsed" IsCancel="True" Width="80" Height="25" />
	</Grid>
</dialogs:DialogBase>
